<template>
    <div class="body">
        <div class="top">
            <div class="top_z">{{Companydetails.projectName}}项目详情</div>
            <div class="top_fh" @click="fh">
                <p class="top_fh_1">返回</p>
            </div>
        </div>
        <div class="bottom">
            <div class="bottom_top">
                <div class="bottom_top_left">
                    <div class="bottom_top_left_bg">
                        <table>
                            <tr>
                                <th>企业名称</th>
                                <td>{{ Companydetails.projectName }}</td>
                            </tr>
                            <tr>
                                <th>项目负责人</th>
                                <td>{{ Companydetails.secretary }}</td>
                            </tr>
                            <tr>
                                <th>项目资金</th>
                                <td>{{ Companydetails.moneyTypeName }}</td>
                            </tr>
                            <tr>
                                <th>占地面积</th>
                                <td>{{ Companydetails.floorSpace }}</td>
                            </tr>
                            <tr>
                                <th>项目类别</th>
                                <td>{{ Companydetails.typeName }}</td>
                            </tr>
                            <tr>
                                <th>区域</th>
                                <td>{{ Companydetails.areaName }}</td>
                            </tr>
                            <tr>
                                <th>电话</th>
                                <td>{{Companydetails.phone}}</td>
                            </tr>
                            <tr>
                                <th>项目进度</th>
                                <td>{{Companydetails.progressName}}</td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="bottom_top_right">
                    <el-image style="width: 47%; height: 33%" :src="item" :preview-src-list="srcList" :initial-index="4"
                        fit="cover" v-for="item,index in srcList" v-show="index<4" :key="index" />
                </div>
            </div>
        </div>
    </div>
</template>
<script setup>
import { useStore, mapState } from 'vuex'
import { computed, onMounted, ref } from 'vue'
import { GetData } from "@/api/index";
import { useRoute, useRouter } from 'vue-router';

const route = useRoute()
const router = useRouter()
const store = useStore()
const srcList = ref([])
let Companydetails = ref({})
let obj = ref('')
const fh = () => {
    router.go(-1)
}


onMounted(async () => {

    let id = route.query.id
    let obj = await GetData(`getProjectInfo/${id}`)
    Companydetails.value = obj
    console.log(Companydetails.value)
    Companydetails.value.imgList.forEach(item => {
        item = `http://139.224.69.209${item}`
        srcList.value.push(item)
    })
    console.log(srcList.value)
})

</script>
<style scoped>
.body {
    width: 100%;
    height: 100%;
}

.top {
    width: 100%;
    height: 10%;
    background-image: url(@/assets/imgs/bt\ 拷贝\ 5.png);
    background-size: 100% 100%;
    overflow: hidden;
    display: flex;
}

.top_z {
    width: 90%;
    height: 100%;
    color: #fff;
    font-size: 2.5vw;
    margin: 0.3vw 2vw;
}

.top_fh {
    cursor: pointer;
    width: 7%;
    height: 50%;
    background-image: url(@/assets/imgs/返回.png);
    background-size: 100% 100%;
    float: right;
    color: #004098;
    margin-top: 1.6%;
}

.top_fh_1 {
    margin-left: 3vw;
    margin-top: 0.7vw;
    font-size: 0.2vw;
}

.bottom {
    width: 100%;
    height: 90%;
    border: 0.1vw solid #1d5bcc;
}

.bottom_top {
    width: 100%;
    height: 50%;
    display: flex;
}

.bottom_top_left {
    width: 50%;
    height: 100%;
}

.bottom_top_left_bg {
    width: 95%;
    height: 90%;
    /* background-image: url(@/assets/imgs/规上工业企业整体.png); */
    background-size: 100% 100%;
    margin: 2% 2%;
}

table {
    width: 100%;
    height: 100%;
    border: 1px solid black;
    border-collapse: collapse;
}

th {
    width: 30%;
}

th,
td {
    height: 1%;
    font-size: 0.1vw;
    border: 1px solid black;

}

.bottom_top_right {
    width: 50%;
    height: 100%;
}

.el-image {
    margin: 1% 0 0 2%;
}

.bottom_bottom {
    width: 100%;
    height: 50%;
    display: flex;
}

.bottom_bottom_left {
    width: 50%;
    height: 100%;
}

.bottom_bottom_left_zt {
    width: 100%;
    height: 90%;
    font-size: 1vw;
    line-height: 2.4vw;
    text-indent: 2.5vw;
}

/* .bottom_bottom_left_tb {
    width: 60%;
    height: 10%;
    background-image: url(../assets/imgs/qybt.png);
    background-size: 100% 100%;
} */

.bottom_bottom_right {
    width: 50%;
    height: 100%;
}

/* .bottom_bottom_right_tb {
    width: 60%;
    height: 10%;
    background-image: url(../assets/imgs/qybt.png);
    background-size: 100% 100%;
} */

.bottom_bottom_right_tbs {
    width: 100%;
    height: 90%;
    /* background-image: url(../../assets/imgs/公司位置整体.png); */
    /* background-size: 100% 100%; */
}

#container {

    border: 5px solid rgb(0, 174, 255);
}


</style>